#include <iostream>
using namespace std;
#include<map>
class Compare
{
public:
	bool operator()(int val1,int val2) const
	{
		return val1 > val2;
	}
};
void test01()
{
	map<int, int, Compare> m;
	m.insert(make_pair(1, 10));
	m.insert(make_pair(3, 30));
	m.insert(make_pair(2, 20));
	for (map<int, int, Compare>::const_iterator it = m.begin(); it != m.end(); it++)
	{
		cout << (*it).first << " " << (*it).second << endl;
	}
}
int main()
{
	test01();
	return 0;
}
